package online.longzipeng.cinemasys.vo.customer;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author lzp
 * @date 2021/4/10 10:05
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "客户保存对象",description = "请求参数类")
public class CustomerSaveVO {

    /**
     * 用户登录账号
     */
    @ApiModelProperty(value = "用户名",example = "lzp",required = false)
    @NotBlank(message = "用户名不能为空")
    private String userName;

    /**
     * 用户密码
     */
    @ApiModelProperty(value = "用户密码",example = "lzp",required = false)
    @NotBlank(message = "密码不能为空")
    private String password;

    /**
     * 用户名称
     */
    @ApiModelProperty(value = "用户名称",example = "lzp",required = false)
    @NotBlank(message = "用户名称不能为空")
    private String nick;

    /**
     * 用户状态(0禁用、1正常、2锁住、3待验证)
     */
    @ApiModelProperty(value = "状态",example = "0禁用、1正常、2锁住、3待验证",required = false)
    @Min(0)
    private Integer status;

    /**
     * 头像地址
     */
    @ApiModelProperty(value = "头像地址",example = "xxx.jpg",required = false)
    private String avatar;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号",example = "123456789",required = false)
    @Pattern(regexp = "^$|(\\+\\d+)?1[34578]\\d{9}$|(\\+\\d+)?(\\d{3,4}\\-?)?\\d{7,8}$|(\\+\\d+)?(\\d{3,4}\\-?)?\\d{7,8}$",message = "手机号格式错误！！")
    private String mobile;

    /**
     * 邮箱地址
     */
    @ApiModelProperty(value = "邮箱地址",example = "longzipeng@foxmail.com",required = false)
    @Pattern(regexp = "^$|^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",message = "邮箱格式错误！！")
    private String email;

    /**
     * QQ
     */
    @ApiModelProperty(value = "QQ",example = "1739028870",required = false)
    @Pattern(regexp = "^$|^\\d{5,}$",message = "QQ号的格式错误！！")
    private String qq;

    /**
     * 微信号
     */
    @ApiModelProperty(value = "微信号",example = "lzp1739028870",required = false)
    @Pattern(regexp = "^$|^[a-zA-Z][a-zA-Z0-9_-]{5,19}$",message = "微信号格式错误！！")
    private String wx;

    /**
     * 外键-vip
     */
    @ApiModelProperty(value = "外键-vip",example = "1",required = false)
    private Long vipId;

}
